package service;

import dao.purchaseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;

@Service
public class DeletePurchaseService {
    @Autowired
    private purchaseMapper purchaseMapper;

    public boolean deletePurchase(Integer pId){
        int i = purchaseMapper.deleteByPrimaryKey(pId);
        if(i > 0){
            return true;
        }
        return false;
    }
}
